/* eslint-disable */
<template>
  <div class="conditions-model">
    <div class="left">
      <div class="form-box">
        <slot
          name="search-group"
          v-if="isShow"
        ></slot>
        <template v-if="!isShow">
          <!-- <div class="list">
            <el-button type="primary" size="mini" @click="_ckQuery" icon="el-icon-search">搜索</el-button>
          </div> -->
          <div class="list">
            <el-form
              ref="elForm"
              :model="formData"
              size="mini"
              label-width="80px"
              :inline="true"
            >
              <el-row>
                <el-col>
                  <el-form-item label="">
                    <el-input
                      placeholder="请输入参数名称"
                      v-model="formData.searchVal"
                      clearable
                      size="mini"
                      style="width: 180px"
                    >
                      <i
                        class="el-icon-search el-input__icon"
                        slot="suffix"
                      ></i>
                    </el-input>
                  </el-form-item>
                  <el-form-item>
                    <el-button
                      type="primary"
                      size="mini"
                      @click="_ckQuery"
                    >搜索</el-button>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </div>
        </template>
      </div>
    </div>
    <div class="right">
      <slot name="button-group"></slot>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'search',
    // eslint-disable-next-line
    data () {
      return {
        formData: {
          searchVal: ''
        }
      }
    },
    props: {
      operation: Array,
    },
    methods: {
      // eslint-disable-next-line
      _ckQuery () {
        const params = {
          ...this.formData
        }
        this.$emit('on-conditions', params)
      },
    },
    computed: {
      // eslint-disable-next-line
      isShow () {
        return this.$slots['search-group']
      },
    },
    // eslint-disable-next-line
    created () {

    },
    components: {},
  }
</script>
<style scoped lang="scss">
::v-deep .el-form-item__label {
  font-size: 12px !important;
}
::v-deep .el-form-item {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}
</style>
